<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h3>动态获取请求参数,数据从index.html 跳转过来</h3>
    <span>"<a href="param?id=100&name=张三">传递ID和NAME的参数</a>"</span>
    id: <p th:text="${param.id}"></p>
    name: <p th:text="${param.name}"></p>
    <h3>获取同名提交参数</h3>
    <p>param?hobby=赚钱&hobby=吃饭&hobby=读书</p>
    <h4>获取所有Hobby</h4>
    <br>
    <div th:text="${param.hobby}"></div>
    <h4>获取第一个Hobby</h4>
    <div th:text="${param.hobby[0]}"></div>
    <hr>
    <h3>获取内置对象</h3>
    request: <p th:text="${#request.getAttribute('request')}"></p>
    session: <p th:text="${#session.getAttribute('session')}"></p>
    application: <p th:text="${#servletContext.getAttribute('application')}"></p>
    <hr>
    <h3>获取公共对象内置属性</h3>
    <p th:text="${#lists.size(nameList)}"></p>
    <p th:text="${#lists.isEmpty(nameList)}"></p>

</body>
</html>